<!--
 @Author: libing/makeup1122
 @Email: makeup1123@163.com
 @Date: "2020-04-06 14:45:40"
-->
<template>
  <v-card flat>
    <v-card-title>自定义链接</v-card-title>
    <v-card-text>
      <v-text-field prepend-icon="launch" label="URl" v-model="formData.link" @input="inputHandle"></v-text-field>
      <v-text-field prepend-icon="title" label="名称" v-model="formData.name" @input="inputHandle"></v-text-field>
    </v-card-text>
    <v-card-actions><slot></slot></v-card-actions>
  </v-card>
</template>
<script>
export default {
  name: 'CustomLink',
  props: {
    value: {
      type: Object,
      default: () => {
        return {
          name: '',
          link: ''
        }
      }
    }
  },
  data: function () {
    return {
      formData: this.value || {
        name: '',
        link: ''
      }
    }
  },
  computed: {},
  created: function () {
  },
  methods: {
    inputHandle: function(e) {
      this.$emit('input', this.formData)
    }
  }
}
</script>
<style scoped>
</style>
